Appearance
XBRL Instance Documents
An instance document is a collection of facts that together make up a business report. It is the "filled-in form" that references an XBRL taxonomy for its vocabulary.
Structure
An instance document is an XML document with root element <xbrli:xbrl>:
xml
<xbrli:xbrl xmlns:xbrli="http://www.xbrl.org/2003/instance"
xmlns:us-gaap="http://fasb.org/us-gaap/2024"
xmlns:iso4217="http://www.xbrl.org/2003/iso4217">
<!-- 1. Schema references (links to taxonomy) -->
<link:schemaRef xlink:href="taxonomy.xsd" xlink:type="simple"/>
<!-- 2. Context definitions -->
<xbrli:context id="FY2024">
<xbrli:entity>
<xbrli:identifier scheme="http://www.cipc.co.za">2024/123456/07</xbrli:identifier>
</xbrli:entity>
<xbrli:period>
<xbrli:startDate>2024-01-01</xbrli:startDate>
<xbrli:endDate>2024-12-31</xbrli:endDate>
</xbrli:period>
</xbrli:context>
<!-- 3. Unit definitions -->
<xbrli:unit id="ZAR">
<xbrli:measure>iso4217:ZAR</xbrli:measure>
</xbrli:unit>
<!-- 4. Facts -->
<us-gaap:Revenue contextRef="FY2024" unitRef="ZAR" decimals="-3">
5000000
</us-gaap:Revenue>
</xbrli:xbrl>The Four Parts
1. Schema References
Link the instance to its taxonomy -- this is what triggers the DTS discovery process.
2. Contexts
Define who (entity), when (period), and optionally additional qualifiers like dimensional breakdowns.
3. Units
Define measurement units for numeric facts (currencies, shares, pure numbers).
4. Facts
The actual reported data. Each fact is an XML element referencing:
- A concept (the element name from the taxonomy)
- A context (via
contextRef) - A unit (via
unitRef, for numeric facts) - Accuracy:
decimalsorprecisionattribute
Types of Facts
| Type | Description | Example |
|---|---|---|
| Item | Single value | Revenue = R5,000,000 |
| Tuple | Group of related values | (Deprecated in [[15 Open Information Model |
Accuracy: Decimals vs Precision
For numeric facts, you must specify accuracy:
decimals="-3"means accurate to the nearest thousand (R5,000,000 could be R4,999,500 to R5,000,499)decimals="0"means accurate to the nearest whole unitdecimals="2"means accurate to two decimal placesdecimals="INF"means exact value
Footnotes
Optional explanatory text linked to specific facts:
xml
<link:footnoteLink>
<link:loc xlink:href="#fact1" xlink:label="factLoc"/>
<link:footnote xlink:label="fn1" xml:lang="en">
Revenue includes R500,000 from discontinued operations.
</link:footnote>
<link:footnoteArc xlink:from="factLoc" xlink:to="fn1"
xlink:arcrole="http://www.xbrl.org/2003/arcrole/fact-footnote"/>
</link:footnoteLink>Instance vs Inline XBRL
Traditional instance documents are pure XML -- not human-readable. 13 Inline XBRL solves this by embedding the same tags directly into HTML documents that humans can read in a browser.